how to count the number of word occurrence in sentence java program